﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WebApplication1.Domain;
using WebApplication1.Domain.Entity;


namespace WebApplication1.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        // GET api/values
        [HttpGet]
        public IEnumerable<Proudcts> Get()
        {
            var list =  new List<Proudcts>();
            using(var db = new Admin3000DbContext())
            {
                list = db.Proudcts.ToList<Proudcts>();
            }
            return list;
        }

     
    }
}
